import {request} from "../../request";

export function getRecipientsById(id){
    return request({
        url:`/lswms/recipients/${id}`,
        method:'get'
    })
}


export function getRecipientsPage(data){
    return request({
        url:'/lswms/recipients/page',
        method:'get',
        params:data
    })
}


export function putRecipients(data){
    return request({
        url:'/lswms/recipients',
        method:'put',
        data:data
    })
}
export function postRecipients(data){
    return request({
        url:'/lswms/recipients',
        method:'post',
        data:data
    })
}

export function deleteRecipients(data){
    return request({
        url:`/lswms/recipients`,
        method:'delete',
        data:data
    })
}
export function exportRecipients(data){
    return request({
        url:`/lswms/recipients/export`,
        method:'get',
        data:data,
        responseType:'blob'
    })
}

// 发放
export function putRelease(data){
    return request({
        url:'/lswms/recipients/release',
        method:'put',
        data:data
    })
}


export function getPicklist(tray) {
	return request({
		url: `/lswms/recipients/picklist/${tray}`,
		method: 'get',
	})
}

//回库
export function backToStereo(data) {
	return request({
		url: `/lswms/recipients/backToStereo`,
		method: 'post',
		data: data
	})
}

//保存
export function savePicklist(data) {
	return request({
		url: `/lswms/recipients/savePicklist`,
		method: 'post',
		data: data
	})
}

// 领取
export function putDelivery(data){
    return request({
        url:'/lswms/recipients/delivery',
        method:'put',
        data:data
    })
	}